package com.ly.mapper;

import com.ly.bean.EasybuySeckillGoods;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
@author 李岩
@date 2021/12/14-13:52
@describe
*/
@Mapper
public interface EasybuySeckillGoodsMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id) throws Exception;

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(EasybuySeckillGoods record) throws Exception;

    /**
     *将商品添加到秒杀表中
     */
    int insertSelective(EasybuySeckillGoods record) throws Exception;

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    EasybuySeckillGoods selectByPrimaryKey(Integer id) throws Exception;

    //查询所有的秒杀商品的申请
    List<EasybuySeckillGoods> showAllKillProduct() throws Exception;

    //查询首页显示的秒杀商品
    List<EasybuySeckillGoods> showSixKillProduct() throws Exception;

    /**
     * 管理员审核秒杀商品的状态
     */
    int updateByPrimaryKeySelective(EasybuySeckillGoods record) throws Exception;

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(EasybuySeckillGoods record) throws Exception;
}